.class public abstract Lcom/netease/newsreader/util/GroupAdapter;
.super Landroid/widget/BaseAdapter;
.source "GroupAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        "S:",
        "Ljava/lang/Object;",
        ">",
        "Landroid/widget/BaseAdapter;"
    }
.end annotation


# instance fields
.field private mList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/netease/newsreader/util/Pair",
            "<TT;",
            "Ljava/util/List",
            "<TS;>;>;>;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Ljava/util/List;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/netease/newsreader/util/Pair",
            "<TT;",
            "Ljava/util/List",
            "<TS;>;>;>;)V"
        }
    .end annotation

    .prologue
    .line 20
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    .local p1, list:Ljava/util/List;,"Ljava/util/List<Lcom/netease/newsreader/util/Pair<TT;Ljava/util/List<TS;>;>;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 21
    iput-object p1, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    .line 22
    return-void
.end method

.method private isGroup(I)Z
    .locals 3
    .parameter "position"

    .prologue
    .line 79
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/util/GroupAdapter;->getRealPosition(I)Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;

    move-result-object v0

    .line 80
    .local v0, itemPosition:Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;,"Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;"
    iget v1, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->pos:I

    const/4 v2, -0x1

    if-ne v1, v2, :cond_0

    const/4 v1, 0x1

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method


# virtual methods
.method public final getChild(II)Ljava/lang/Object;
    .locals 3
    .parameter "groupPosition"
    .parameter "childPosition"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(II)TS;"
        }
    .end annotation

    .prologue
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    const/4 v2, 0x0

    .line 142
    iget-object v1, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge p1, v1, :cond_0

    iget-object v1, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/util/Pair;

    iget-object v1, v1, Lcom/netease/newsreader/util/Pair;->second:Ljava/lang/Object;

    check-cast v1, Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge p2, v1, :cond_0

    .line 144
    :try_start_0
    iget-object v1, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/util/Pair;

    iget-object v1, v1, Lcom/netease/newsreader/util/Pair;->second:Ljava/lang/Object;

    check-cast v1, Ljava/util/List;

    invoke-interface {v1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    .line 150
    :goto_0
    return-object v1

    .line 145
    :catch_0
    move-exception v0

    .local v0, ex:Ljava/lang/Exception;
    move-object v1, v2

    .line 146
    goto :goto_0

    .end local v0           #ex:Ljava/lang/Exception;
    :cond_0
    move-object v1, v2

    .line 150
    goto :goto_0
.end method

.method public getChildId(II)J
    .locals 2
    .parameter "groupPosition"
    .parameter "childPosition"

    .prologue
    .line 156
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public abstract getChildView(IILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.end method

.method public final getChildrenCount(I)I
    .locals 1
    .parameter "groupPosition"

    .prologue
    .line 163
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    iget-object v0, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/util/Pair;

    iget-object v0, v0, Lcom/netease/newsreader/util/Pair;->second:Ljava/lang/Object;

    check-cast v0, Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public final getCount()I
    .locals 4

    .prologue
    .line 26
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    iget-object v2, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v0

    .line 27
    .local v0, count:I
    iget-object v2, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_0

    .line 30
    return v0

    .line 27
    :cond_0
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/util/Pair;

    .line 28
    .local v1, pair:Lcom/netease/newsreader/util/Pair;,"Lcom/netease/newsreader/util/Pair<TT;Ljava/util/List<TS;>;>;"
    iget-object v2, v1, Lcom/netease/newsreader/util/Pair;->second:Ljava/lang/Object;

    check-cast v2, Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    add-int/2addr v0, v2

    goto :goto_0
.end method

.method public final getGroup(I)Ljava/lang/Object;
    .locals 1
    .parameter "groupPosition"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I)TT;"
        }
    .end annotation

    .prologue
    .line 167
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    iget-object v0, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/util/Pair;

    iget-object v0, v0, Lcom/netease/newsreader/util/Pair;->first:Ljava/lang/Object;

    return-object v0
.end method

.method public final getGroupCount()I
    .locals 1

    .prologue
    .line 171
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    iget-object v0, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getGroupId(I)J
    .locals 2
    .parameter "groupPosition"

    .prologue
    .line 175
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public final getGroupPosition(Ljava/lang/Object;)I
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)I"
        }
    .end annotation

    .prologue
    .line 132
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    .local p1, t:Ljava/lang/Object;,"TT;"
    iget-object v2, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v0

    .line 133
    .local v0, N:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-lt v1, v0, :cond_1

    .line 138
    const/4 v1, -0x1

    .end local v1           #i:I
    :cond_0
    return v1

    .line 134
    .restart local v1       #i:I
    :cond_1
    iget-object v2, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/netease/newsreader/util/Pair;

    iget-object v2, v2, Lcom/netease/newsreader/util/Pair;->first:Ljava/lang/Object;

    invoke-virtual {v2, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_0

    .line 133
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method

.method public abstract getGroupView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.end method

.method public final getGroupViewPosition(I)I
    .locals 3
    .parameter "group"

    .prologue
    .line 115
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    if-ltz p1, :cond_0

    iget-object v2, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lt p1, v2, :cond_2

    .line 116
    :cond_0
    const/4 v1, -0x1

    .line 123
    :cond_1
    return v1

    .line 118
    :cond_2
    const/4 v1, 0x0

    .line 119
    .local v1, position:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-ge v0, p1, :cond_1

    .line 120
    iget-object v2, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/netease/newsreader/util/Pair;

    iget-object v2, v2, Lcom/netease/newsreader/util/Pair;->second:Ljava/lang/Object;

    check-cast v2, Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    add-int/2addr v1, v2

    .line 121
    add-int/lit8 v1, v1, 0x1

    .line 119
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method public final getItem(I)Ljava/lang/Object;
    .locals 3
    .parameter "position"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I)TS;"
        }
    .end annotation

    .prologue
    .line 35
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/util/GroupAdapter;->getRealPosition(I)Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;

    move-result-object v0

    .line 36
    .local v0, itemPosition:Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;,"Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;"
    iget v1, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->pos:I

    const/4 v2, -0x1

    if-ne v1, v2, :cond_0

    .line 37
    const/4 v1, 0x0

    .line 39
    :goto_0
    return-object v1

    :cond_0
    iget-object v1, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    iget v2, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->group:I

    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/util/Pair;

    iget-object v1, v1, Lcom/netease/newsreader/util/Pair;->second:Ljava/lang/Object;

    check-cast v1, Ljava/util/List;

    iget v2, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->pos:I

    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    goto :goto_0
.end method

.method public final getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 44
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getItemViewType(I)I
    .locals 1
    .parameter "position"

    .prologue
    .line 59
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    invoke-direct {p0, p1}, Lcom/netease/newsreader/util/GroupAdapter;->isGroup(I)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public final getRealPosition(I)Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;
    .locals 6
    .parameter "position"

    .prologue
    .line 90
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    new-instance v3, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;

    invoke-direct {v3}, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;-><init>()V

    .line 91
    .local v3, itemPosition:Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;,"Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;"
    const/4 v1, 0x0

    .line 92
    .local v1, groupPosition:I
    iget-object v5, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v0

    .line 93
    .local v0, N:I
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    if-lt v2, v0, :cond_0

    .line 104
    :goto_1
    return-object v3

    .line 94
    :cond_0
    iput v2, v3, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->group:I

    .line 95
    iget-object v5, p0, Lcom/netease/newsreader/util/GroupAdapter;->mList:Ljava/util/List;

    invoke-interface {v5, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/netease/newsreader/util/Pair;

    iget-object v5, v5, Lcom/netease/newsreader/util/Pair;->second:Ljava/lang/Object;

    check-cast v5, Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v4

    .line 96
    .local v4, size:I
    add-int v5, v1, v4

    if-lt v5, p1, :cond_1

    .line 97
    sub-int v5, p1, v1

    add-int/lit8 v5, v5, -0x1

    iput v5, v3, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->pos:I

    goto :goto_1

    .line 100
    :cond_1
    add-int/lit8 v5, v4, 0x1

    add-int/2addr v1, v5

    .line 93
    add-int/lit8 v2, v2, 0x1

    goto :goto_0
.end method

.method public final getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 3
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 49
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/util/GroupAdapter;->getRealPosition(I)Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;

    move-result-object v0

    .line 50
    .local v0, itemPosition:Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;,"Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;"
    iget v1, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->pos:I

    const/4 v2, -0x1

    if-ne v1, v2, :cond_0

    .line 51
    iget v1, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->group:I

    invoke-virtual {p0, v1, p2, p3}, Lcom/netease/newsreader/util/GroupAdapter;->getGroupView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    .line 53
    :goto_0
    return-object v1

    :cond_0
    iget v1, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->group:I

    iget v2, v0, Lcom/netease/newsreader/util/GroupAdapter$ItemPosition;->pos:I

    invoke-virtual {p0, v1, v2, p2, p3}, Lcom/netease/newsreader/util/GroupAdapter;->getChildView(IILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    goto :goto_0
.end method

.method public getViewTypeCount()I
    .locals 1

    .prologue
    .line 64
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    const/4 v0, 0x2

    return v0
.end method

.method public final hasStableIds()Z
    .locals 1

    .prologue
    .line 182
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    const/4 v0, 0x0

    return v0
.end method

.method public isEnabled(I)Z
    .locals 1
    .parameter "position"

    .prologue
    .line 69
    .local p0, this:Lcom/netease/newsreader/util/GroupAdapter;,"Lcom/netease/newsreader/util/GroupAdapter<TT;TS;>;"
    invoke-direct {p0, p1}, Lcom/netease/newsreader/util/GroupAdapter;->isGroup(I)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method
